package com.frinder.base.akka;

import akka.actor.ActorSystem;
import akka.dispatch.PriorityGenerator;
import akka.dispatch.UnboundedPriorityMailbox;
import com.typesafe.config.Config;

/**
 * @author frinder
 * @date 2018/6/5
 * @className PriorityMailbox
 * @package com.kiktech.base.akka
 * @Description: Actor Request 优先级处理器，application.conf 中配置
 */
public class PriorityMailbox extends UnboundedPriorityMailbox {

    public PriorityMailbox(ActorSystem.Settings settings, Config config) {
        super(new PriorityGenerator() {
            @Override
            public int gen(Object message) {
                return 9;
            }
        });
    }
}